<?php

namespace App\Http\Controllers\Web;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Services\RankService;

class PagesController extends Controller
{

    //
    public function root(Request $request)
    {
        $season = (int)$request->query('season', env('KILL_SEASON'));

        $rank = app()
            ->get(RankService::class)
            ->index($season);

        return view('pages.root', ['rank' => $rank]);
    }
}
